<div class="container-fluid">
  	<div class="row-fluid">
		
		<div class="span2">
		  	<div class="well sidebar-nav">
		    	<ul class="nav nav-list">
		      		<li class="nav-header">Sidebar</li>
		      		<?php 
						echo '<li class="">'.$this->Html->link('Applications',array('controller'=>'applications','action'=>'index')).'</li>';
					?>
					<?php 
						echo '<li class="">'.$this->Html->link('--'.h($sonapp['Application']['name']),array('controller'=>'applications','action'=>'View',$sonapp['Application']['id']))."</li>";
					?>
					<?php 
						echo '<li class="active">'.$this->Html->link('----'.h($saversion['Version']['name']),array('controller'=>'versions','action'=>'View',$saversion['Version']['id']))."</li>";
					?>
					<li></br></li>
		    	</ul>
		  	</div><!--/.well -->
		</div><!--/span-->

		<div class="span10">
			<div class="container-fluid"> 
				<div class="row-fluid">
					<div class="span12">
						<?php echo $this->Session_gpp->flash();
					            //'Message.success');
					            ?>
				 	</div>
				</div>

				<div class="row-fluid">
					<div class="span12">
						<h2><?php echo __('Tables');?></h2>
					</div>
				</div>
				<div class="row-fluid">
					<div class="span12">
						<div class="navbar"/>
							<div class="navbar-inner_gpp">
								<div class="container-fluid">
									<div class="nav-collapse">
										<p><?php echo $this->Html->link(__('New Table'), array('action' => 'add'), array('class'=>'btn btn-primary btn-small')); ?></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="row-fluid">
					<div class="span12">
						<div class="page-header" style="margin-top: 10px">
							<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
								<thead>
									<tr>
										<th><?php echo __('id');?></th>
										<th><?php echo __('name');?></th>
										<th><?php echo __('Description');?></th>
										<th><?php echo __('Nb Colonnes');?></th>
										<th><?php echo __('Nb Lignes');?></th>
										<th class="center"><?php echo __('Actions');?></th>
									</tr>
									</tr>
								</thead>

								<tbody>	
									<?php
									foreach ($tables as $table): ?>
									<tr>
										<td><?php echo h($table['Table']['id']); ?>&nbsp;</td>
										<td><?php echo $this->Html->link(h($table['Table']['name']),array('action' => 'view', $table['Table']['id']))?>&nbsp;</td>
										<td><?php echo h($table['Table']['description']); ?>&nbsp;</td>
										<td>
											<?php echo $this->Html->link($nbcolonnes[$table['Table']['id']]['count'], array('controller' => 'colonnes', 'action' => 'ColonnesOfTable', $table['Table']['id'])); ?>
										</td>
										<td>
											<?php echo $this->Html->link($nblignes[$table['Table']['id']]['count'], array('controller' => 'lignes', 'action' => 'LignesOfTable', $table['Table']['id'],$table['Table']['name'])); ?>
										</td>
										<td class="center">
											<?php echo $this->Html->link($nblignes[$table['Table']['id']]['count'], array('controller' => 'dynamiques', 'action' => 'DynamiqueOfTable', $table['Table']['id'])); ?>
											<p>
												<?php echo $this->Moninput->delete(
															__('Delete'),
															array($table['Table']['id'], $table['Table']['version_id']),
															'Tables',
															__('Are you sure you want to delete # '.$table['Table']['id'].'?')
														); ?>
											</p>
										</td>
									</tr>
								<?php endforeach; ?>
							</table>
							</table>
						</div>
					</div>
			</div>
		</div>
	</div>

	<!--div class="row-fluid">
		<div class="span12">
			<div class="page-header">
				<h2>SQL TRACE</h2>
				<p><?php echo $this->element('sql_dump'); ?></p>
			</div>
		</div><!--/span-->
  	</div><!--/row-->

  	<hr>

	<footer>
		<p>&copy;Copyright RLEB 2012</p>
	</footer>

</div><!--/.fluid-container-->